package com.zmj.sy.mom.srv.aps.controller;

import com.zmj.sy.mom.srv.aps.bean.vo.base.BaseResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.phaseext.PhaseExtEditReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.phaseext.PhaseExtGetReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.phaseext.PhaseExtGetResVo;
import com.zmj.sy.mom.srv.aps.service.PhaseExtService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RequiredArgsConstructor
@Api(tags = "工序扩展")
@RestController
@RequestMapping("/phaseExt")
public class PhaseExtController {

    private final PhaseExtService phaseExtService;

    @ApiOperation("获取工序扩展")
    @GetMapping("/get")
    public PhaseExtGetResVo get(PhaseExtGetReqVo reqVo) {
        return phaseExtService.get(reqVo);
    }

    @ApiOperation("编辑工序扩展")
    @PostMapping("/edit")
    public BaseResVo edit(@RequestBody PhaseExtEditReqVo reqVo) {
        phaseExtService.edit(reqVo);
        return BaseResVo.ok();
    }

}
